From: Stefan Monnier Date: Thu, 4 Mar 2004 00:28:42 +0000 (+0000) Subject: (fill-comment-paragraph): Be more careful when X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23824 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=e6cf369c351a224773eb657320005693ec15e7d5;p=emacs.git (fill-comment-paragraph): Be more careful when recognizing leading comment on code line. --- diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 69cb7fd8d06..7a794d67c5e 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -822,7 +822,11 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'." (looking-at comment-re))) ;; We may have gone too far. Go forward again. (line-beginning-position - (if (looking-at (concat ".*\\(?:" comment-start-skip "\\)")) + (if (progn + (goto-char + (or (comment-search-forward (line-end-position) t) + (point))) + (looking-at comment-re)) 1 2)))) ;; Find the beginning of the first line past the region to fill. (save-excursion